Improved Termination Analysis of CHR Using Self-sustainability Analysis
نویسندگان
چکیده
In the past few years, several successful approaches to termination analysis of Constraint Handling Rules (CHR) have been proposed. In parallel to these developments, for termination analysis of Logic Programs (LP), recent work has shown that a stronger focus on the analysis of the cycles in the strongly connected components (SCC) of the program is very beneficial, both for precision and efficiency of the analysis. In this paper we investigate the benefit of using the cycles of the SCCs of CHR programs for termination analysis. It is a non-trivial task to define the notion of a cycle for a CHR program. We introduce the notion of a self-sustaining set of CHR rules and show that it provides a natural counterpart for the notion of a cycle in LP. We prove that non-selfsustainability of an SCC in a CHR program entails termination for all queries to that SCC. Then, we provide an efficient way to prove that an SCC of a CHR program is non-self-sustainable, providing an additional, new way of proving termination of (part of) the program. We integrate these ideas into the CHR termination analyser CHRisTA and demonstrate by means of experiments that this extension significantly improves both the efficiency and the performance of the analyser.
منابع مشابه
A new approach to termination analysis of CHR
We present a new approach to termination analysis of Constraint Handling Rules (CHR). Unlike current approaches, our approach has no restrictions on the kind of rules in the CHR program. We propose a termination condition that verifies conditions imposed on the dynamic process of adding constraints to the store, instead of a termination argument based on the comparison of sizes of consecutive c...
متن کاملTermination Analysis of CHR Revisited
Today, there exist two distinct direct approaches to prove termination of CHR programs. Both are applicable on separate classes of CHR programs. One approach, by T. Frühwirth, proves termination of CHR programs without propagation rules. A second approach deals with CHR programs with propagation rules. Due to its extended scope to such programs, it fails to prove termination for a class of CHR ...
متن کاملA new approach to termination analysis of constraint handling rules
We present a new approach to termination analysis of Constraint Handling Rules. The approach, compared to existing approaches, is applicable to a much larger class of CHR programs. A new termination condition is formulated, that instead of a termination argument based on the comparison of sizes of consecutive computation states, verifies conditions imposed on the dynamic process of adding const...
متن کاملA Transformational Approach for Proving Properties of the CHR Constraint Store
Proving termination of, or generating efficient control for Constraint Handling Rules (CHR) programs requires information about the kinds of constraints that can show up in the CHR constraint store. In contrast to Logic Programming (LP), there are not many tools available for deriving such information for CHR. Hence, instead of building analyses for CHR from scratch, we define a transformation ...
متن کاملProving termination of CHR in Prolog: A transformational approach
In this paper we present a termination preserving transformation from Constraint Handling Rules to Prolog. The transformation is sound w.r.t. termination under the theoretical semantics of Constraint Handling Rules. It does not consider the presence of a propagation history. The transformation allows for the direct reuse of termination proof methods from Logic Programs and Term-Rewrite Systems,...
متن کامل